#include "andgate.h"

andgate::andgate()
{

}

andgate::andgate(int inp1_ID, int inp2_ID, int out_id)
{
    this->setInput1_ID(inp1_ID);
    this->setInput2_ID(inp2_ID);
    this->setOutput_ID(out_id);
}

void andgate::setInput1_ID(int ID)
{
    this->input1_ID = ID;
}

int andgate::getInput1_ID()
{
    return this->input1_ID;
}

void andgate::setInput2_ID(int ID)
{
    this->input2_ID = ID;
}

int andgate::getInput2_ID()
{
    return this->input2_ID;
}

void andgate::setOutput_ID(int ID)
{
    this->output_ID = ID;
}

int andgate::getOutput_ID()
{
    return this->output_ID;
}

void andgate::setInput1_value(bool value)
{
    this->input1_value = value;
}

bool andgate::getInput1_value()
{
    return this->input1_value;
}

void andgate::setInput2_value(bool value)
{
    this->input2_value = value;
}

bool andgate::getInput2_value()
{
    return this->input2_value;
}
void andgate::setOutput_value(bool value)
{
    this->output_value = value;
}

bool andgate::getOutput_value()
{
    return this->output_value;
}

bool andgate::calcuOutput(bool inp1, bool inp2)
{
    if(inp1 == true && inp2 == true)
    {
        return true;
    }else{
        return false;
    }
}
